<template>
  <div>
    <div style="margin-bottom:20px">扣款详情</div>
    <Timeline>
      <TimelineItem v-for="(item,index) in detail" :key="index">
        <p class="time">
          <Row>
            <i-col span="3">
              <span>{{item.dealdate}}</span>
              <span>{{item.dealdatetime}}</span>
            </i-col>
            <i-col span="3">本次转账次数:{{item.times}}</i-col>
            <i-col span="5" :class="item.dealresults == '失败'?'red':'green'">
              <span style="margin-right:20px">{{item.dealresults}}</span>
              <span v-if="item.dealresults == '失败'">
                失败原因：{{item.cause}}
              </span>
            </i-col>
          </Row>
        </p>
      </TimelineItem>
    </Timeline>
  </div>
</template>

<script>
export default {
  props: {
    row: Object
  },
  data() {
    return {
      detail: []
    };
  },
  methods: {
    // 详情
    doTransferAccountsTotal(){
      let obj = {
        contno: this.row.contno,
        paytodate: this.row.paytodate
      };

      let i = 0;
      this.api.doTransferAccountsTotal(obj).then(res=>{
        if(res.code == 200){
          if(res.data){
            this.detail = res.data;
          }else{
            this.detail = null;
          }
        }
      });
    }
  },
  created(){
    this.doTransferAccountsTotal();
  },
  mounted() {
   
  }
};
</script>
<style scoped lang="less">
</style>